package best.driver.android.Beans;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by xiangxuefeng on 15/8/24.
 */
public class OrderStatus {
    public final static String WAIT_ORDER = "WAIT_ORDER";
    public final static String WAIT_CHOOSE = "WAIT_CHOOSE";
    public final static String WAIT_START = "WAIT_START";
    public final static String STARTED = "STARTED";
    public final static String LOADING = "LOADING";
    public final static String IN_TRANSIT = "IN_TRANSIT";
    public final static String UNLOADING = "UNLOADING";
    public final static String RETURNING = "RETURNING";
    public final static String FINISHED = "FINISHED";
    public final static String CANCELED = "CANCELED";

    public final static String SHIPPER_ADDRESS = "SHIPPER_ADDRESS";
    public final static String RECEIVER_ADDRESS = "RECEIVER_ADDRESS";

    //单点／多点标识
    public final static String ONE_TO_ONE = "ONE_TO_ONE";
    public final static String ONE_TO_N = "ONE_TO_N";
    public final static String N_TO_ONE = "N_TO_ONE";

    //订单类型
    public final static String REAL_TIME = "REAL_TIME";
    public final static String BOOK = "BOOK";


    private static OrderStatus mOrderStatus;
    private static Map<String, String> mOrderStatusMap = new HashMap<String, String>();
    public static OrderStatus getInstance() {
        if(mOrderStatus != null) {
            return  mOrderStatus;
        } else {
            mOrderStatus = new OrderStatus();
            generateOrderStatusMap();
            return mOrderStatus;
        }
    }

    public Map<String, String> getOrderStatusMap() {
        return mOrderStatusMap;
    }

    private static void generateOrderStatusMap() {
        mOrderStatusMap.clear();
        mOrderStatusMap.put("WAIT_ORDER", "待抢单");
        mOrderStatusMap.put("WAIT_CHOOSE","待选择");
        mOrderStatusMap.put("WAIT_START","待出发");
        mOrderStatusMap.put("STARTED","已出发");
        mOrderStatusMap.put("LOADING","装货中");
        mOrderStatusMap.put("IN_TRANSIT","运输中");
        mOrderStatusMap.put("UNLOADING","卸货中");
        mOrderStatusMap.put("RETURNING","待送回单/回款");
        mOrderStatusMap.put("FINISHED","已完成");
        mOrderStatusMap.put("CANCELED","已取消");
    }


}
